/**
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
*/
import request from '@/utils/request';

// 铺层库复合材料
export function getCompositeMaterialList(pageParams) {
  const param = { pageNum: pageParams.pageNum, pageSize: pageParams.pageSize, materialName: pageParams.materialName, materialNumber: pageParams.materialNumber }
  return request({
    // url: `/isfd/compositeMaterial/list?pageNum=${pageParams.pageNum}&pageSize=${pageParams.pageSize}&materialName=${pageParams.materialName}&materialNumber=${pageParams.materialNumber}`,
    // method: 'get'
    url: '/isfd/compositeMaterial/list',
    method: 'post',
    data: param
  });
}

// 新增
export function addCompositeMaterial(data) {
  return request({
    url: `/isfd/compositeMaterial`,
    method: 'post',
    data
  });
}

// 修改
export function updateCompositeMaterial(data) {
  return request({
    url: `/isfd/compositeMaterial`,
    method: 'put',
    data
  });
}

// 删除
export function deleteCompositeMaterial(ids) {
  return request({
    url: `/isfd/compositeMaterial/${ids}`,
    method: 'delete',
  });
}

// 铺层库金属材料  
export function getMetalMaterialList(pageParams) {
  const param = { pageNum: pageParams.pageNum, pageSize: pageParams.pageSize, materialName: pageParams.materialName, materialNumber: pageParams.materialNumber }
  return request({
    // url: `/isfd/metalMaterial/list?pageNum=${pageParams.pageNum}&pageSize=${pageParams.pageSize}&materialName=${pageParams.materialName}&materialNumber=${pageParams.materialNumber}`,
    // method: 'get'
    url: '/isfd/metalMaterial/list',
    method: 'post',
    data: param
  });
}

// 新增
export function addMetalMaterial(data) {
  return request({
    url: `/isfd/metalMaterial`,
    method: 'post',
    data
  });
}

// 修改
export function updateMetalMaterial(data) {
  return request({
    url: `/isfd/metalMaterial`,
    method: 'put',
    data
  });
}

// 删除
export function deleteMetalMaterial(ids) {
  return request({
    url: `/isfd/metalMaterial/${ids}`,
    method: 'delete',
  });
}
// 静强度材料  
export function getMaterialStaticList(pageParams) {
  const param = { pageNum: pageParams.pageNum, pageSize: pageParams.pageSize, name: pageParams.materialName, mid: pageParams.materialNumber }
  return request({
    url: '/isfd/metalMaterialStaticStrengthAnalysis/list',
    method: 'post',
    data: param
  });
}

// 新增
export function addMaterialStatic(data) {
  return request({
    url: `/isfd/metalMaterialStaticStrengthAnalysis`,
    method: 'post',
    data
  });
}

// 修改
export function updateMaterialStatic(data) {
  return request({
    url: `/isfd/metalMaterialStaticStrengthAnalysis`,
    method: 'put',
    data
  });
}

// 删除
export function deleteMaterialStatic(ids) {
  return request({
    url: `/isfd/metalMaterialStaticStrengthAnalysis/${ids}`,
    method: 'delete',
  });
}